/*
 * ApplicationRequestProcesser.java
 *
 * Created on 2008/06/14 +0900
 *
 * $Revision: 38 $
 * $Date: 2008-10-11 08:48:45 +0000 (Sat, 11 Oct 2008) $
 */

package org.gikolet.framework.application;

import org.gikolet.framework.request.Request;
import org.gikolet.framework.request.RequestProcesser;
import org.gikolet.framework.request.SingleThreadRequestProcesser;

/**
 * @author Tetsutaro (latest modification by $Author: tetsutaro.ss $)
 * @version $Revision: 38 $ $Date: 2008-10-11 08:48:45 +0000 (Sat, 11 Oct 2008) $
 */
public class ApplicationRequestProcesser implements RequestProcesser {
    private SingleThreadRequestProcesser requestProcesser;

    public ApplicationRequestProcesser() {
	this.requestProcesser = new SingleThreadRequestProcesser();
    }

    public void startRequest() {
	this.requestProcesser.start();
    }

    public void stopRequest() {
	this.requestProcesser.stop();
    }

    public void stopAllRequest() {
	this.requestProcesser.stop();
    }

    public boolean isAlive() {
	return this.requestProcesser.isAlive();
    }

    public boolean isRequestProcesserThread() {
	return this.requestProcesser.isRequestProcesserThread();
    }

    public void invoke(Request request) {
	this.requestProcesser.invoke(request);
    }

    public void invokeAndWait(Request request) throws InterruptedException, Throwable {
	this.requestProcesser.invokeAndWait(request);
    }

    /**
     * @see org.gikolet.framework.request.RequestProcesser#createRequestProcesser()
     */
    public RequestProcesser createRequestProcesser() {
	// TODO 自動生成されたメソッド・スタブ
	return null;
    }
}
